/**
 * Created by chenxiaopeng on 2018/3/6.
 */
import React from 'react';
import { connect } from 'dva';
import { List, Button } from 'antd-mobile';
import { routerRedux } from 'dva/router';
import CustomIcon from '../components/CustomIcon';
import './WeChatPage.less';

const { Item } = List;


function WeChatPage({ dispatch }) {
  return (
    <div className="body">
      <List
        renderHeader={() => '请选择支付方式'}
      >
        <Item
          onClick={() => {}}
          extra={<CustomIcon type={require('../svg/selected.svg')} className="item-icon" />}
        >
          <div className="item-pay">
            <CustomIcon type={require('../svg/wechat.svg')} className="item-icon" />
            <div className="item-text">
              <span className="item-title">
                微信付款
              </span>
              <span className="item-subtitle">
                (推荐微信用户使用)
              </span>
            </div>
          </div>
        </Item>
        <Item extra={'¥29元'}>实付金额</Item>
      </List>
      <Button className="button" type="primary" inline onClick={() => { dispatch(routerRedux.push('Success')); }} >确认支付29元</Button>
    </div>
  );
}

WeChatPage.propTypes = {
};

export default connect()(WeChatPage);
